package reliability.types.graph;


import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.Vector;

public class VectorOfMinimalPaths
    extends Vector<PathsInfo>
{
    public String toString()
    {
        String str = "";
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        PrintStream printStream = new PrintStream(byteArrayOutputStream);

        for (PathsInfo pathsInfo: this)
        {
            printStream.print(pathsInfo.startNodeKey + " - " + pathsInfo.finishNodeKey + ":\t");
            printStream.println(pathsInfo.paths);
        }
        try
        {
            str = byteArrayOutputStream.toString("UTF-8");
        }
        catch (UnsupportedEncodingException ex)
        {
            ex.printStackTrace();
        }

        return str;
    }
}
